iff %@removable[%@instr[0,2,%Targetpath]] eq 1 .and. "%Sfx" eq "Y" then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
iff %@removable[%@instr[0,2,%Targetpath]] ne 1 then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
# 16 48 bla on bri red N^screen 16 48^set Jump=Y^inkey /c %%Volumes^check %Volumes
iff "%Volumes" eq "@72" then^# 16 48 bla on bri red ` `^# 15 48 bla on bri red ` `^unset /q Jump^goto Line6A^elseiff "%Volumes" eq "@80" then^set Volumes=N^endiff
iff "%Volumes" eq "@28" .or. "%Volumes" eq "N" then^set Volumes=N^# 16 48 bla on bri red No^goto Line8A^endiff
iff "%Volumes" eq "Y" then^# 16 48 bla on bri red Yes^goto Line8A^elseiff "%Volumes" eq "@59" then
set Line1=`This option is to create & split an archive into multiple `^set Line2=`floppy-disks(for backup purposes) Hit a key to continue ...`
# 17 48 bla on bri red N^screen 17 48^inkey /c %%Store^check %Store
iff "%Store" eq "@72" .and. "%Jump" eq "Y" then^# 17 48 bla on bri red ` `^# 16 48 bla on bri red ` `^goto Line7A
elseiff "%Store" eq "@72" .and. "%Jump" eq "" then^# 17 48 bla on bri red ` `^# 16 48 bla on bri red ` `
# 15 48 bla on bri red ` `^goto Line6A^endiff^iff "%Store" eq "@28" .or. "%Store" eq "N" .or. "%Store" eq "@80" then^set Store=N
unset /q Jump^# 17 48 bla on bri red No^goto Line9A^endiff^iff "%Store" eq "Y" then^# 17 48 bla on bri red Yes^goto Line9A^elseiff "%Store" eq "@59" then
set Line1=`You can store the whole path within an archive, so that is `^set Line2=`possible to restore the same path. Hit a key to continue...`
iff "%Reverse" eq "@28" .or. "%Reverse" eq "N" then^unset Reverse^# 15 48 bla on bri red No reversed sortorder^goto Line7C^endiff
iff "%Reverse" eq "Y" then^set Sort=%Sort%r^# 15 48 bla on bri red Sorting will be reversed^goto Line7C^endiff
iff "%Reverse" eq "@59" then^set Line1=`If you want all sorting to be done reversed you must choose`^set Line2=`YES. Answer NO will not reverse ! Hit a key to continue... `
gosub Help^goto Line6C^else^set Message=`Answer with Y(es) or N(o) , anything else is not allowed`^gosub Messagebox^goto Line6C^endiff
:Line7C
# 18 48 bla on bri red Y^screen 18 48^inkey /c %%Start^check %Start
iff "%Start" eq "@72" then^# 18 48 bla on bri red ` `^# 15 48 bla on bri red %@repeat[%@char[255],24]^ goto Line6C^endiff
iff "%Extract" eq "@28" .or. "%Extract" eq "N" then^# 14 46 bla on bri red No^goto Line6D^endiff
if "%Extract" eq "Y" goto Subline5D^iff "%Extract" eq "@59" then^set Line1=`This option is to extract a file archived within a ZIP-file`
set Line2=`to screen, e.g. show the contents. Hit a key to continue. `^gosub Help^goto Line5D^else^gosub Messagebox^goto Line5D^endiff
:Subline5D
# 20 58 bla on bri red %@repeat[%@char[205],11]^# 14 46 bla on bri red ` `^# 14 13 blu on bri red `Give filename within ZIP-file :`^screen 14 46^input /l26 /c %%File
iff "%File" eq "" then^set Message=`You must enter a filename which will be extracted to screen`^gosub Messagebox^goto Subline5D^else goto Line8D^endiff
:Line6D
# 15 46 bla on bri red N^screen 15 46^inkey /c %%Repair^check %Repair^iff "%Repair" eq "@28" .or. "%Repair" eq "@80" then^set Repair=N^endiff
iff "%Repair" eq "N" .or. "%Repair" eq "@28" then^# 15 46 bla on bri red No^goto Line7D^endiff
iff "%Repair" eq "Y" then^# 15 46 bla on bri red Yes^goto Line9D^elseiff "%Repair" eq "@59" then^set Line1=`If you got a message that a ZIP-file is probably corrupted, `
set Line2=`you can repair it with PKZIPFIX. Hit a key to continue. `^gosub Help^goto Line6D^else^gosub Messagebox^goto Line6D^endiff
:Line7D
# 16 46 bla on bri red N^screen 16 46^inkey /c %%Erase^check %Erase
iff "%Erase" eq "@28" .or. "%Erase" eq "N" then^unset /q Erase^set Message=`* No options has been choosen, mainscreen will be opened *`^gosub Messagebox^goto Mainscreen^endiff
iff "%Erase" eq "Y" then^goto Subline7D^elseiff "%Erase" eq "@59" then^set Line1=`With this option you can delete an archived file within a `
set Line2=`ZIP-file. Hit a key to continue. `^gosub Help^goto Line7D^else^gosub Messagebox^goto Line7D^endiff
:Subline7D
# 20 58 bla on bri red %@repeat[%@char[205],11]^# 16 46 bla on bri red ` `^# 16 13 blu on bri red `Give filename within ZIP-file :`^screen 16 46^input /c %%File
iff "%File" eq "" then^set Message=`You must enter a filename which will be erased from %@upper[%@filename[%Sourcepath]]`^gosub Messagebox^goto Subline7D^else goto Line9D^endiff
:Line8D
# 20 58 bla on bri red %@repeat[%@char[205],11]^screen 17 46^unset /q Psd^input /c /L17 /P %%Psd
iff "%Psd" eq "" then^# 17 46 bla on bri red ` [No password] `^ else^# 17 46 bla on bri red ` [Password hidden] `^endiff
:Line9D
# 20 58 bri yel on bri red ` F1 = Help `^# 18 46 bla on bri red Y^screen 18 46^inkey /c %%Start^check %Start
# 19 11 bri yel on bri red %@repeat[%@char[255],61]^# 19 13 bri yel on bri red Full path for 4ZIP.CFG :
screen 19 38^input /c /E /L34 %%Cfgpath
iff %@removable[%@instr[0,2,%Cfgpath]] eq 1 then^set Message=`The configurationfile can only be created on a fixed disk`^gosub Messagebox^goto SubLine10E^endiff
iff %@filename[%Cfgpath] ne 4ZIP.CFG .or. not isdir %@path[%Cfgpath] then^set Message=`Syntax error : Filename must be 4ZIP.CFG or incorrect path`
gosub Messagebox^goto SubLine10E^endiff
:Line11E
# 22 58 bri yel on bri red ` F1 = Help `^# 20 57 bla on bri red Y^screen 20 57^inkey /c %%Main^check %Main
iff "%Main" eq "@72" then^unset Main Savecfg^# 19 13 bri yel on bri red `Save configuration in 4ZIP.CFG (Y/N): `
# 20 57 bla on bri red ` `^goto Line10E^endiff
iff "%Main" eq "@59" then^set Line1=`YES returns to the mainscreen, NO causes 4ZIP to go back to`
set Line2=`the beginning of this screen. Hit a key to continue. `^gosub Help^goto Line11E^endiff
iff %@index[YN@28,%Main] eq -1 then^gosub Messagebox^goto Line11E^endiff^iff "%Main" eq "N" then^# 20 57 bla on bri red No^goto Screen5^endiff
iff "%Main" eq "Y" .or. "%Main" eq "@28" then^# 20 57 bla on bri red Yes^endiff^if "%Savecfg" eq "Y" gosub CFG_Create
iff "%Error" eq "Y" then^set Message=`%@upper[%@Path[%Cfgpath]] not matching your PATH, 4ZIP.CFG will be deleted`
if exist %Startpath del /q %Startpath^Timer >! %_Boot:\ziptime.dat^set ziptime=%@substr[%@line[%_boot:\ziptime.dat,0],%@eval[%@len[%@line[%_boot:\ziptime.dat,0]]-8],5]
if exist %_Boot:\ziptime.dat del /q %_Boot:\ziptime.dat^iff errorlevel le 1 then^snd
echo Archive-file %@upper[%@filename[%Sourcepath]] succesfully extracted in %@upper[%@path[%Extractpath]]
echo Total time elapsed: %ziptime Minutes^else^gosub UnZipErrors^endiff^unset /q ziptime^Pause^goto Mainscreen
:PkDescript
screen 1 0 Restoring 4DOS-descriptions, one moment please . . . ^ set handle=%@fileopen[%Startpath%,read]
do forever
if "%_Col" eq "51" (set _Col=0^set _Sign=%@inc[%_Sign]^if %_Sign gt 178 set _Sign=176)
set _Val=%@fileread[%handle]
if %_Val eq **EOF** leave
set _Name=%@word[0,%_Val]
set _Desc=%@trim[%@instr[%@len[%@word[0,%_Val]],%@len[%_Val],%_Val]]